package com.elong.spring.advisor;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

import org.springframework.aop.ClassFilter;
import org.springframework.aop.support.DynamicMethodMatcherPointcut;

public class GreetingDynamicPointcur extends DynamicMethodMatcherPointcut{

    private static List<String> specialClientList = new ArrayList<>();
    
    static {
	specialClientList.add("John");
	specialClientList.add("Tom");
    }
    
    public ClassFilter getClassFilter(){
	return new ClassFilter(){

	    @Override
	    public boolean matches(Class<?> clazz) {
		System.out.println("调用getclassFilter对" + clazz + "做静态检查");
		
		return Waiter.class.isAssignableFrom(clazz);
	    }
	};
    }
    
    @Override
    public boolean matches(Method method, Class<?> targetClass, Object[] args) {
	// TODO Auto-generated method stub
	return false;
    }

}
